package com.eling.elcms.travel.model;

import com.eling.elcms.core.dao.annotation.In;
import com.eling.elcms.core.model.BaseModel;
import org.hibernate.search.annotations.DocumentId;
import org.hibernate.search.annotations.Indexed;
import org.hibernate.search.annotations.IndexedEmbedded;

import javax.persistence.*;

/**
 * 入住联盟确认详细
 * @author zhoulin
 *
 */
@Entity
@Table(name = "travel_allianceconfirmdetail")
@Indexed
public class AllianceConfirmDetail extends BaseModel {

	private static final long serialVersionUID = -338052980428625101L;
	
	@Id
	@In
	@DocumentId
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long pkAllianceConfirmDetail;
	
	/** 入住确认*/
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "pkAllianceConfirm")
	@IndexedEmbedded(depth = 1)
	private AllianceConfirm allianceConfirm;
	
	/** 报名登记*/
	@OneToOne(fetch = FetchType.LAZY, cascade = CascadeType.MERGE)
	@JoinColumn(name = "pkSignUpRegister")
	@IndexedEmbedded(depth = 1)
	private SignUpRegister signUpRegister;
	
	@Version
	private Integer version;

	public Long getPkAllianceConfirmDetail() {
		return pkAllianceConfirmDetail;
	}

	public void setPkAllianceConfirmDetail(Long pkAllianceConfirmDetail) {
		this.pkAllianceConfirmDetail = pkAllianceConfirmDetail;
	}

	public AllianceConfirm getAllianceConfirm() {
		return allianceConfirm;
	}

	public void setAllianceConfirm(AllianceConfirm allianceConfirm) {
		this.allianceConfirm = allianceConfirm;
	}

	public SignUpRegister getSignUpRegister() {
		return signUpRegister;
	}

	public void setSignUpRegister(SignUpRegister signUpRegister) {
		this.signUpRegister = signUpRegister;
	}

	public Integer getVersion() {
		return version;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}
	
}
